<?php
namespace app\admin\controller;
use app\admin\model\Signrecord as thisModel;
use app\admin\model\Equipgroup as equipgroupModel;
use think\Db;
use Env;
use PHPExcel_IOFactory;
class Signrecord extends Common
{
    function index(){
        $thisModel = new thisModel();
        $equipgroupModel = new equipgroupModel();
        $mainData = $thisModel->mainData();
        $inputData = input('get.');

     // dump($mainData);exit;
        $list = $mainData['list'];
        foreach($list as &$v){
            $location = Db::name('location')->field('location')->where(array('id'=>$v['location_id']))->find();
            $v['location'] = $location['location'];
        }
        $this->assign('list',$list);
        $this->assign('page',$mainData['page']);
        $this->assign('count',$mainData['count']);
        $this->assign('inputData',$inputData);

        return $this->fetch('index');
    }
}